﻿using Knife.Core.Util;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Knife.Core.Model
{
    public class CustomSchedulerPlugin
    {
        public void Initialize(string pluginName, global::Quartz.IScheduler sched)
        {
            DirectoryInfo SchedulerLogDir = new DirectoryInfo(System.Web.HttpContext.Current.Server.MapPath("~/Log/CustomSchedulerPlugin"));
            if (!SchedulerLogDir.Exists)
            {
                SchedulerLogDir.Create();
            }
            LogUtil.WriteLog("Logs/CustomSchedulerPlugin", "log_", "任务调度器初始化!");
        }

        public void Shutdown()
        {
            LogUtil.WriteLog("Logs/CustomSchedulerPlugin", "log_", "任务调度器关闭!");
        }

        public void Start()
        {
            LogUtil.WriteLog("Logs/CustomSchedulerPlugin", "log_", "调度器开始运行!");
        }
    }
}
